/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import React, { useState, useCallback } from 'react';
import StandardTab from '@/components/StandardTab';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import ScanRecords from './ScanRecords';
import ScanType from './ScanType';
import styles from '../style.less';

export default function CustomScan() {
  const [activeKey, setActiveKey] = useState(0);
  const onChange = useCallback(_activeKey => {
    setActiveKey(_activeKey);
  }, []);
  return (
    <PageHeaderLayout title="自定义扫描">
      <div className={styles.main}>
        <div style={{ paddingBottom: '24px' }}>
          <StandardTab
            style={{ marginBottom: 24 }}
            onChange={onChange}
            activeKey={activeKey}
            name="scan"
            panes={[
              {
                tab: '扫描记录',
                component: <ScanRecords />,
              },
              {
                tab: '扫描类型',
                component: <ScanType />,
              },
            ]}
          />
        </div>
      </div>
    </PageHeaderLayout>
  );
}
